"""
JAKE ELLOWITZ
"""

import random

class brain:
  
  def __init__ (self, n_states, n_actions):
    # Only here for policy sharing compatibility
    self.n_states = n_states
    self.n_actions = n_actions
    self.q = self.init_qs (self.n_states, self.n_actions)
    self.v = self.init_vs (self.n_states)    

  def init_qs (self, n_states, n_actions):
    q = []
    for i in xrange (0, n_states):
      q.append ([])
      for j in xrange (0, n_actions):
        q[i].append (0.)
    return q

  def init_vs (self, n_states):
    v = []
    for i in xrange (0, n_states):
      v.append (0.)
    return v

  def update_vs (self, n_states, q, v):
    return v
    
  def iterate (self, old_state, old_action, reward, state):
    return random.randint (0,self.n_actions-1)
